{% load unfold_list i18n %}

<div class="bg-gray-50 flex my-4 items-center p-3 rounded-md text-sm dark:bg-gray-800">
    {% if pagination_required %}
        {% for i in page_range %}
            <div class="{% if forloop.last %}pr-2{% else %}pr-4{% endif %}">
                {% paginator_number cl i %}
            </div>
        {% endfor %}
    {% endif %}

    <div>
        {% if pagination_required %}
            -
        {% endif %}

        {{ cl.result_count }}

        {% if cl.result_count == 1 %}
            {{ cl.opts.verbose_name }}
        {% else %}
            {{ cl.opts.verbose_name_plural }}
        {% endif %}
    </div>

    {% if show_all_url %}
        <a href="{{ show_all_url }}" class="showall ml-4 text-primary-600 dark:text-primary-500">
            {% translate 'Show all' %}
        </a>
    {% endif %}

    {% if cl.formset and cl.result_count %}
        <div class="ml-auto">
            <button type="submit" name="_save" class="bg-primary-600 font-medium rounded-md px-3 py-1 text-white">
                {% translate 'Save' %}
            </button>
        </div>
    {% endif %}
</div>
